﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
using DAL;
using System.Data;

namespace BLL
{
    public class ChulianManager
    {
        //登录
        public static DataTable Login(adminModel admin)
        {
            return DAL.ChulianSeriver.SelectAdmin(admin);
        }
        //获取网站信息
        public static DataTable Web()
        {
            return DAL.ChulianSeriver.selectWeb();
        }
        //更新网站信息
        public static bool updateWeb(WebModels web)
        {
            return DAL.ChulianSeriver.updateWeb(web);
        }
        //更新api
        public static bool updateApi(WebModels web)
        {
            return DAL.ChulianSeriver.updateApi(web);
        }
        //查询所有用户
        public static DataTable selectUser()
        {
            return DAL.ChulianSeriver.selectUser();
        }
        //查询id用户
        public static DataTable selectUser(int id)
        {
            return DAL.ChulianSeriver.selectUser(id);
        }
        //删除用户
        public static bool DeleteUser(int id)
        {
            return DAL.ChulianSeriver.DeleteUser(id);
        }
        //模糊查询用户
        public static DataTable selectName(userModels userModels)
        {
            return DAL.ChulianSeriver.selectName(userModels);
        }
        //添加用户
        public static bool Insert(userModels user)
        {
            return DAL.ChulianSeriver.Insert(user);
        }
        //更新用户信息
        public static bool updateUser(userModels user)
        {
            return DAL.ChulianSeriver.updateUser(user);
        }
    }
}
